/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author dong
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface JydqUserFavorite extends BasicModel<JydqUserFavorite> {
  productId?: string; // 商品ID
}

export const jydqUserFavoriteList = (params?: JydqUserFavorite | any) =>
  defHttp.get<JydqUserFavorite>({ url: adminPath + '/jydq/userFavorite/list', params });

export const jydqUserFavoriteListData = (params?: JydqUserFavorite | any) =>
  defHttp.post<Page<JydqUserFavorite>>({ url: adminPath + '/jydq/userFavorite/listData', params });

export const jydqUserFavoriteForm = (params?: JydqUserFavorite | any) =>
  defHttp.get<JydqUserFavorite>({ url: adminPath + '/jydq/userFavorite/form', params });

export const jydqUserFavoriteSave = (params?: any, data?: JydqUserFavorite | any) =>
  defHttp.postJson<JydqUserFavorite>({ url: adminPath + '/jydq/userFavorite/save', params, data });

export const jydqUserFavoriteDelete = (params?: JydqUserFavorite | any) =>
  defHttp.get<JydqUserFavorite>({ url: adminPath + '/jydq/userFavorite/delete', params });
